import CryptoJS from 'crypto-js'

export function objToBase64(data) {
  const wordArray = CryptoJS.enc.Utf8.parse(JSON.stringify(data))
  const base64 = CryptoJS.enc.Base64url.stringify(wordArray, false)
  return base64
}
